//
//  BannerView.swift
//  sss
//
//  Created by HOrange on 2020/2/24.
//  Copyright © 2020 hrrMac. All rights reserved.
//

import UIKit


protocol BannerViewDelegate:NSObjectProtocol {
    func numberOfBanner() -> Int
    func viewOfBanner() -> UIView
}

class BannerView: UIView {
    var scrollView = UIScrollView()
    
    ///是否自动滑动
    var isAutoSilder = true
    ///自动滑动时间
    var silderTime = 3
    
    var contentView: [UIView] = []
    
    weak var delegate: BannerViewDelegate?
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        configUI()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
        configUI()
    }
    
    
    func configUI(){
        scrollView.frame = self.bounds
        addSubview(scrollView)
    }
    
    func realodData(){
//        if delegate != nil {
//            if let num = self.delegate?.responds(to: #selector(self.delegate?.numberOfBanner)) {
//                
//            }
//        }
//        contentView =
    }
    
    
}
